#include "registerfactory.h"
#include "Modules/ModuleInterface.h"
#include "Modules/NetWorkInterface.h"
#include "Modules/TcpNetwork.h"
#include "Modules/registermodule.h"
#include "registerfunctionality.h"

registerFactory::registerFactory()
    : FunctionalityFactory()
{}

std::shared_ptr<FunctionalityInterface> registerFactory::create()
{
    //首先需要创建TCP模块和申请证书模块
    std::shared_ptr<NetworkInterface> network = std::make_shared<TcpNetwork>();

    std::shared_ptr<ModuleInterface> module = std::make_shared<registerModule>();
    std::shared_ptr<FunctionalityInterface> function
        = std::make_shared<registerFunctionality>(network, module);
    return function;
}
